package cn.agiledata.bank.linkbank.impl;

import cn.agiledata.bank.linkbank.logic.payment.BankTelPayRequestFeekback;

public abstract class AbstractBankTelPayRequestFeekback implements
        BankTelPayRequestFeekback {
    private String telBankNo = "";

    private String returnCode;

    private String returnMessage;

    public final BankTelPayRequestFeekback copy() {
        AbstractBankTelPayRequestFeekback requestFeekback = getCopiedInstance();
        requestFeekback.returnCode = this.returnCode;
        requestFeekback.returnMessage = this.returnMessage;
        return requestFeekback;
    }

    public final String getTelBankNo() {
        return this.telBankNo;
    }

    public final void setTelBankNo(String telBankNo) {
        this.telBankNo = telBankNo;
    }

    public final String getReturnCode() {
        return this.returnCode;
    }

    public final String getReturnMessage() {
        return this.returnMessage;
    }

    protected final void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    protected final void setReturnMessage(String returnMessage) {
        this.returnMessage = returnMessage;
    }

    public boolean isSuccessful() {
        return getSuccessReturnCode().equals(getReturnCode());
    }

    /**
     * 
     * @return 表示支付成功的返回码
     */
    protected abstract String getSuccessReturnCode();

    /**
     * 
     * @return 复制出的AbstractBankTelPayRequestFeekback实例
     */
    protected abstract AbstractBankTelPayRequestFeekback getCopiedInstance();

}
